// src/components/ReadERC20.tsx
import React, {useEffect, useState } from 'react'
import {LinkOverlay, Text,Link} from '@chakra-ui/react'
import {ERC20ABI as abi} from 'abi/ERC20ABI'
import {ethers} from 'ethers'
import { Contract } from "ethers"

interface Props {
    to: string,
    children:string
    //currentAccount: string | undefined
}

declare let window: any

export default function MenuItem(props:Props){
  // const addressContract = props.addressContract
  // const currentAccount = props.currentAccount

  let to = props.to;
  let children = props.children;
  //setTo(props.to)

    
  
  // },[currentAccount])  

  return (
    <Link href={to}>
        <Text display="block" >
          {children}
        </Text>
      </Link>
  )
}
